]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
NotificationDaemon: don't fail if a tray icon has no WM_CLASS
authorGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 10 Sep 2012 13:43:24 +0000 (15:43 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 10 Sep 2012 16:40:05 +0000 (18:40 +0200)
If there is no WM_CLASS for a tray icon, it returns null, not the empty
string. Detect that case without an exception.

https://bugzilla.gnome.org/show_bug.cgi?id=683724

js/ui/notificationDaemon.js

index 5b41197d12ee3a52a1c8e18531f3ddb1d3f02aa7..2e800b3a4d3cf377ee2e7c2856fc8a02b2312018 100644 (file)
@@ -499,7 +499,7 @@ const NotificationDaemon = new Lang.Class({
     },
 
     _onTrayIconAdded: function(o, icon) {
-        let wmClass = icon.wm_class.toLowerCase();
+        let wmClass = icon.wm_class ? icon.wm_class.toLowerCase() : '';
         if (STANDARD_TRAY_ICON_IMPLEMENTATIONS[wmClass] !== undefined)
             return;